import 'package:flutter/material.dart';
import 'package:fluwx/fluwx.dart';
import 'package:qgchat/common/global/global.dart';

class Wx extends StatefulWidget {
  final Widget child;
  Wx({this.child, Key key}) : super(key: key);

  @override
  _WxState createState() => _WxState();
}

class _WxState extends State<Wx> {
  @override
  void initState() {
    super.initState();
    registerWxApi(
      appId: Config.WECHAT_APPID,
      universalLink: Config.WECHAT_UNIVERSAL_LINK,
    );
  }

  @override
  Widget build(BuildContext context) {
    return widget.child;
  }
}
